package com.shepin.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.shepin.R;
import com.shepin.myactivity.MyOrderActivity;
import com.shepin.myactivity.MyWalletActivity;
import com.shepin.myactivity.SetttingActivity;


/*
 * me
 */
public class MyActivity extends Fragment implements View.OnClickListener{
    private ImageView wo_order;
    private ImageView wo_goods;
    private ImageView wo_evaluate;
    private ImageView wo_aftersales;
    private RelativeLayout deliveryaddress;
    private RelativeLayout mywallet;
    private RelativeLayout membercenter;
    private RelativeLayout redeem;
    private RelativeLayout setting;
    private RelativeLayout servicecenter;
    private RelativeLayout contactme;




	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.wo_activity, null);
        initView(v);
		return v;
	}

    public void initView(View view){
        wo_order=(ImageView)view.findViewById(R.id.wo_order);
        wo_order.setOnClickListener(this);
        wo_goods=(ImageView)view.findViewById(R.id.wo_goods);
        wo_goods.setOnClickListener(this);
        wo_evaluate=(ImageView)view.findViewById(R.id.wo_evaluate);
        wo_evaluate.setOnClickListener(this);
        wo_aftersales=(ImageView)view.findViewById(R.id.wo_aftersales);
        wo_aftersales.setOnClickListener(this);
        deliveryaddress=(RelativeLayout)view.findViewById(R.id.deliveryaddress);
        deliveryaddress.setOnClickListener(this);
        mywallet=(RelativeLayout)view.findViewById(R.id.mywallet);
        mywallet.setOnClickListener(this);
        membercenter=(RelativeLayout)view.findViewById(R.id.membercenter);
        membercenter.setOnClickListener(this);
        redeem=(RelativeLayout)view.findViewById(R.id.redeem);
        redeem.setOnClickListener(this);
        setting=(RelativeLayout)view.findViewById(R.id.setting);
        setting.setOnClickListener(this);
        servicecenter=(RelativeLayout)view.findViewById(R.id.servicecenter);
        servicecenter.setOnClickListener(this);
        contactme=(RelativeLayout)view.findViewById(R.id.contactme);
        contactme.setOnClickListener(this);



    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.wo_order:
                Intent order=new Intent(MyActivity.this.getActivity(), MyOrderActivity.class);
                startActivity(order);
                break;
            case R.id.wo_goods:

                break;
            case R.id.wo_evaluate:

                break;
            case R.id.wo_aftersales:

                break;
            case R.id.deliveryaddress:

                break;
            case R.id.mywallet:
                Intent wallet=new Intent(MyActivity.this.getActivity(), MyWalletActivity.class);
                startActivity(wallet);
                break;
            case R.id.membercenter:

                break;
            case R.id.redeem:

                break;
            case R.id.setting:
                Intent setting=new Intent(MyActivity.this.getActivity(), SetttingActivity.class);
                startActivity(setting);
                break;
            case R.id.servicecenter:

                break;
            case R.id.contactme:

                break;

        }
    }
}
